#ifndef APPLYFRIENDRESPONSEMESSAGETOSERVER_H
#define APPLYFRIENDRESPONSEMESSAGETOSERVER_H

#include "./entities/message/superClass/message.h"

/*
Json数据格式
{
    "messageType": [ApplyFriendResponseToServer](int)
    "status": [status](string)
    "alias": [alias](string)
    "id": [id](int) 这个字段用来确保收到客户端收到好友请求消息
}
// id字段是后来加的，其实不需要userId和friendId了，但后续防止功能扩展时候用到，所以暂时保留沿用
*/
class ApplyFriendResponseMessageToServer : public Message
{
public:
    ApplyFriendResponseMessageToServer() = delete;

    ApplyFriendResponseMessageToServer(const Status& status, const Alias& alias, const Id& id);
    ApplyFriendResponseMessageToServer(const QJsonObject&);
    QJsonObject PackJsonData() const override;
    Status getStatus() const;
    Alias getAlias() const;
    Id getId() const;

private:
    Status m_status;
    Alias m_alias;
    Id m_id;
};

// 编译时注册
Q_DECLARE_METATYPE(ApplyFriendResponseMessageToServer)

#endif // APPLYFRIENDRESPONSEMESSAGETOSERVER_H
